{include file="common/head"/}
<div class="main"> 
    <div class="layui-card-header"><i class="layui-icon">&#xe60b;</i>订单信息</div>
    <div class="layui-card-body payinfo">
        {if $order.state===1}<div  style="text-align: center; padding:30px"><i class="layui-icon" style="font-size:60px; color:#FF5722">&#x1005;</i></div>{/if}
        {if $order.state===2}<div  style="text-align: center; padding:30px"><i class="layui-icon" style="font-size:60px; color:#0cb46a">&#x1005;</i></div>{/if}
        <div class="orderid">
            <span class="name">订单号：</span>
            <span class="ordernum">{$order.orderid}</span>
        </div>
        <div class="orderid">
            <span class="name">订单金：</span> 
            <span class="ordernum">{$order.money}</span><span class="name">元</span>
        </div> 
        <div class="paybot" style="padding-top: 15px;"> 
            <button type="submit" class="layui-btn layui-btn-fluid" lay-submit>{$order.msg}{if $order.returnurl && $order.state==1} ， 5秒后返回商户{/if}</button>
        </div>
    </div> 
</div>   
<script src='https://cdn.bootcss.com/socket.io/2.0.3/socket.io.js'></script>
<script> 
layui.use(['jquery'], function(){
    $ = layui.jquery; 
    var state="{$order.state}";
    var returnurl="{$order.returnurl}";
    if(state==1){
        var content='{$order.userid}|{$order.agentid}'
        var pushurl="http://"+document.domain+":2121/?type=publish&content="+content;
        $.get(pushurl);  
        if(returnurl){
            setTimeout( function(){
                self.location.href=returnurl;
            }, 5 * 1000 ); 
        } 
    } 
});   
</script>  
</body>
</html>